package com.fsl.alibabanacosmulticonfigclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class TestController {

    @Value("${yuddspace.name:}")
    private String name;

    @Value("${yuddspace.age:}")
    private String age;

    @Value("${yuddspace.address:}")
    private String address;

    @GetMapping("/test")
    public String hello() {
        //for循环100次
        int sum = 0;
        for(int i=1;i<=100;i++){
            sum = sum + i;
        }
        //利用高斯算法
        sum = (1+100)*100/2;






        return "name = "+name+",age = "+age+",address = "+address;
    }

}
